/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-07-18
 * Time: 18:14
 */
public class Main_1 {
    public static void main(String[] args) {
        //使用常量串构造
        String s1 = "hello world";
        System.out.println(s1);

        //使用 new String对象
        String s2 = new String("hello world");
        System.out.println(s2);

        //使用字符数组构造
        char[] ch = {'h','e','l','l','o'};
        String s3 = new String(ch);
        System.out.println(s3);
    }
}
